package br.com.fpf.pontoapp.view.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import br.com.fpf.pontoapp.R;

/**
 * @author hildon.lima
 * 
 */
public class SplashActivity extends Activity implements Runnable {

	public static final int TIME_SHOWING = 3000;

	/*
	 * (non-Javadoc)
	 * 
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash_screen);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see android.app.Activity#onResume()
	 */
	@Override
	protected void onResume() {
		super.onResume();
		new Handler().postDelayed(this, TIME_SHOWING);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Runnable#run()
	 */
	@Override
	public void run() {
		Intent it = new Intent(this, LoginActivity.class);
		startActivity(it);
		this.finish();
	}

}
